home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2004 March / PCWMAR04.iso / Software / Trial / TestTrack Pro 6 / ttprowininstall.exe / %MAINDIR% / StyleSheets / List / NonDetailReport.xslt < prev   
Encoding:
Extensible Markup Language  |  2003-12-12  |  25.0 KB  |  617 lines

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:external="http://www.seapine.com" exclude-result-prefixes="external" id="TT V5.0 NonDetailReport.xslt">
  3.  
  4.     <!-- Parameters used by the server, DO NOT MODIFY -->
  5.     <xsl:param name="ChartFileNames" />
  6.     <xsl:param name="Legend" />
  7.     <xsl:variable name="RecordsPerPage" select="SeapineReport/rows_per_page" />
  8.  
  9.     <!-- Specifies the maximum number of charts that will appear on a single row in the html output -->
  10.     <xsl:param name="MaxChartsPerLine" select="3" />
  11.  
  12.     <!-- Specifies the background color to use for every other row in the report detail -->
  13.     <xsl:param name="AlternateRowColor" select=" '#99CCFF' " />
  14.  
  15.     <!-- Contains the default settings for the table containing the page header -->
  16.     <xsl:attribute-set name="report-pageheader-table-format">
  17.         <xsl:attribute name="width">100%</xsl:attribute>
  18.         <xsl:attribute name="border">0</xsl:attribute>
  19.         <xsl:attribute name="cellpadding">0</xsl:attribute>
  20.         <xsl:attribute name="cellspacing">0</xsl:attribute>
  21.     </xsl:attribute-set>
  22.  
  23.     <!-- Contains external image tag for the image in the page header -->
  24.     <xsl:attribute-set name="report-pageheader-image">
  25.         <xsl:attribute name="src">
  26.             <xsl:value-of select="external:get-server-image('seapinelogo.jpg')" disable-output-escaping = "yes" />
  27.         </xsl:attribute>
  28.     </xsl:attribute-set>
  29.  
  30.     <!-- Contains the default settings for table cell containing the image in the page header -->
  31.     <xsl:attribute-set name="report-pageheader-image-format">
  32.         <xsl:attribute name="align">left</xsl:attribute>
  33.         <xsl:attribute name="valign">middle</xsl:attribute>
  34.         <xsl:attribute name="class">ReportTitleClass</xsl:attribute>
  35.     </xsl:attribute-set>
  36.  
  37.     <!-- Contains the default settings for the column heading table cells -->
  38.     <xsl:attribute-set name="report-header-title-format">
  39.         <xsl:attribute name="align">right</xsl:attribute>
  40.         <xsl:attribute name="valign">middle</xsl:attribute>
  41.         <xsl:attribute name="class">ReportTitleClass</xsl:attribute>
  42.     </xsl:attribute-set>
  43.  
  44.     <!-- Contains the default settings for the reporting period in the page header-->
  45.     <xsl:attribute-set name="report-header-reporting-date-format">
  46.         <xsl:attribute name="align">center</xsl:attribute>
  47.         <xsl:attribute name="valign">middle</xsl:attribute>
  48.         <xsl:attribute name="class">SubtotalCellClass</xsl:attribute>
  49.         <xsl:attribute name="colspan">2</xsl:attribute>
  50.     </xsl:attribute-set>
  51.  
  52.     <!-- Contains the default settings for the report footer table -->
  53.     <xsl:attribute-set name="report-pagefooter-table-format">
  54.         <xsl:attribute name="width">100%</xsl:attribute>
  55.         <xsl:attribute name="border">0</xsl:attribute>
  56.         <xsl:attribute name="cellpadding">0</xsl:attribute>
  57.         <xsl:attribute name="cellspacing">0</xsl:attribute>
  58.     </xsl:attribute-set>
  59.  
  60.     <!-- Contains the default settings for the report detail  table -->
  61.     <xsl:variable name="detail-table-bordersize" select="0" />
  62.     <xsl:variable name="detail-table-width" select=" '100%' " />
  63.     <xsl:variable name="detail-table-cellpadding" select="2" />
  64.     <xsl:variable name="detail-table-cellspacing" select="0" />
  65.     <xsl:attribute-set name="report-detail-table-format">
  66.         <xsl:attribute name="width">
  67.             <xsl:value-of select="$detail-table-width" disable-output-escaping = "yes" />
  68.         </xsl:attribute>
  69.         <xsl:attribute name="border">
  70.             <xsl:value-of select="$detail-table-bordersize" disable-output-escaping = "yes" />
  71.         </xsl:attribute>
  72.         <xsl:attribute name="cellpadding">
  73.             <xsl:value-of select="$detail-table-cellpadding" disable-output-escaping = "yes" />
  74.         </xsl:attribute>
  75.         <xsl:attribute name="cellspacing">
  76.             <xsl:value-of select="$detail-table-cellspacing" disable-output-escaping = "yes" />
  77.         </xsl:attribute>
  78.     </xsl:attribute-set>
  79.  
  80.     <!-- Contains the default settings for the column heading table cells -->
  81.     <xsl:attribute-set name="report-column-heading-format">
  82.         <xsl:attribute name="align">left</xsl:attribute>
  83.         <xsl:attribute name="bgcolor">#2B558A</xsl:attribute>
  84.         <xsl:attribute name="valign">middle</xsl:attribute>
  85.         <xsl:attribute name="class">ColumnHeaderClass</xsl:attribute>
  86.     </xsl:attribute-set>
  87.  
  88.     <!-- Contains the default settings for the row  heading table cells -->
  89.     <xsl:attribute-set name="report-row-heading-format">
  90.         <xsl:attribute name="align">left</xsl:attribute>
  91.         <xsl:attribute name="valign">middle</xsl:attribute>
  92.         <xsl:attribute name="class">RowHeaderClass</xsl:attribute>
  93.     </xsl:attribute-set>
  94.  
  95.     <!-- Contains the default settings for the data cells for the report detail  table-->
  96.     <xsl:attribute-set name="report-data-cell-format">
  97.         <xsl:attribute name="align">left</xsl:attribute>
  98.         <xsl:attribute name="valign">middle</xsl:attribute>
  99.         <xsl:attribute name="class">DataCellClass</xsl:attribute>
  100.     </xsl:attribute-set>
  101.  
  102.     <!-- Contains the default settings for the data cells for the report detail  table-->
  103.     <xsl:attribute-set name="report-subtotal-cell-format">
  104.         <xsl:attribute name="align">left</xsl:attribute>
  105.         <xsl:attribute name="valign">middle</xsl:attribute>
  106.         <xsl:attribute name="class">SubtotalCellClass</xsl:attribute>
  107.     </xsl:attribute-set>
  108.  
  109.     <xsl:attribute-set name="report-column-total-row-format">
  110.         <xsl:attribute name="align">left</xsl:attribute>
  111.         <xsl:attribute name="bgcolor">#6699cc</xsl:attribute>
  112.         <xsl:attribute name="valign">middle</xsl:attribute>
  113.         <xsl:attribute name="class">ColumnTotalClass</xsl:attribute>
  114.     </xsl:attribute-set>
  115.  
  116.     <!-- Contains the default settings for the data cells for the report detail  table-->
  117.     <xsl:attribute-set name="report-pagefooter-cell-format">
  118.         <xsl:attribute name="align">left</xsl:attribute>
  119.         <xsl:attribute name="valign">middle</xsl:attribute>
  120.         <xsl:attribute name="class">DataCellClass</xsl:attribute>
  121.     </xsl:attribute-set>
  122.  
  123.     <!-- Defines the default font settings used in the report -->
  124.     <xsl:template name="DefineStyles">
  125.         <!-- Default font settings for the image displayed in the left hand area of the Report Header -->
  126.         <STYLE>  
  127.                  .ReportTitleGraphicClass     {
  128.                     FONT-FAMILY: 'serif';
  129.                     FONT-SIZE: 30px;
  130.                     COLOR: #2B558A;
  131.                     FONT-WEIGHT:bold;
  132.                 }
  133.           </STYLE>
  134.         <!-- Default font settings for the title of the report displayed in the right hand area of the Report Header -->
  135.         <STYLE>  
  136.                  .ReportTitleClass    {
  137.                     FONT-FAMILY: 'serif';
  138.                     FONT-SIZE: 30px;
  139.                     COLOR: #2B558A;
  140.                     FONT-WEIGHT:bold;
  141.                 }
  142.           </STYLE>
  143.         <!-- Default font settings for the report detail Column Headings -->
  144.         <STYLE>  
  145.                  .ColumnHeaderClass    {
  146.                     font-family: 'sans-serif';
  147.                     font-weight: bold;
  148.                     font-size: 12px;
  149.                     COLOR: white;
  150.                 }
  151.           </STYLE>
  152.         <!-- Default font settings for the report detail Row Headings -->
  153.         <STYLE>  
  154.                  .RowHeaderClass    {
  155.                     font-family: 'sans-serif';
  156.                     font-weight: bold;
  157.                     font-size: 12px;
  158.                     COLOR: black;
  159.                 }
  160.           </STYLE>
  161.         <!-- Default font settings for the report detail data cells -->
  162.         <STYLE>  
  163.                  .DataCellClass    {
  164.                     font-family: 'sans-serif';
  165.                     font-weight: ;
  166.                     font-size: 12px;
  167.                     COLOR: black;
  168.                 }
  169.           </STYLE>
  170.         <!-- Default font settings for the report detail subtotal cells -->
  171.         <STYLE>  
  172.                  .SubtotalCellClass    {
  173.                     font-family: 'sans-serif';
  174.                     font-weight: bold ;
  175.                     font-size: 12px;
  176.                     COLOR: black;
  177.                 }
  178.           </STYLE>
  179.         <!-- Default font settings for the report detail column total cells -->
  180.         <STYLE>  
  181.                  .SubtotalCellClass    {
  182.                     font-family: 'sans-serif';
  183.                     font-weight: bold ;
  184.                     font-size: 12px;
  185.                     COLOR: black;
  186.                 }
  187.           </STYLE>
  188.     </xsl:template>
  189.  
  190.     <!-- Overrides the field format for a cell from the XML data if the user overrode any of the stylesheet settings -->
  191.     <xsl:template name="OverrideCellFormat">
  192.         <xsl:if test="HAlign">
  193.             <xsl:attribute name="align">
  194.                 <xsl:value-of select="HAlign" disable-output-escaping = "yes" />
  195.             </xsl:attribute>
  196.         </xsl:if>
  197.         <xsl:if test="VAlign">
  198.             <xsl:attribute name="valign">
  199.                 <xsl:value-of select="VAlign" disable-output-escaping = "yes" />
  200.             </xsl:attribute>
  201.         </xsl:if>
  202.         <xsl:if test="Width">
  203.             <xsl:attribute name="width">
  204.                 <xsl:value-of select="Width" disable-output-escaping = "yes" />
  205.             </xsl:attribute>
  206.         </xsl:if>
  207.         <xsl:if test="Height">
  208.             <xsl:attribute name="height">
  209.                 <xsl:value-of select="Height" disable-output-escaping = "yes" />
  210.             </xsl:attribute>
  211.         </xsl:if>
  212.         <xsl:if test="BackgroundColor">
  213.             <xsl:attribute name="bgcolor">
  214.                 <xsl:value-of select="BackgroundColor" disable-output-escaping = "yes" />
  215.             </xsl:attribute>
  216.         </xsl:if>
  217.     </xsl:template>
  218.  
  219.     <!-- Displays the Column Heading Row of the Report Detail Tablel -->
  220.     <xsl:template match="TableHeader">
  221.         <tr class="ColumnHeaderClass">
  222.             <xsl:for-each select="ColHeading">
  223.                 <TD xsl:use-attribute-sets="report-column-heading-format">
  224.                     <xsl:call-template name="OverrideCellFormat" />
  225.                     <span style="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily} ">
  226.                         <xsl:if test="string-length(Label)>0">
  227.                             <xsl:value-of select="Label" disable-output-escaping = "yes" />
  228.                         </xsl:if>
  229.                         <xsl:if test="string-length(Label)=0">
  230.                               <!-- Netscape ignores backgound color if we don't do this-->
  231.                         </xsl:if>
  232.                     </span>
  233.                 </TD>
  234.             </xsl:for-each>
  235.         </tr>
  236.     </xsl:template>
  237.  
  238.     <!-- If an alternate row color is defined in the xsl variable "AlternateRowColor" this template will adjust the background color for the row -->
  239.     <xsl:template name="AlternateRowColors">
  240.         <xsl:if test="string-length($AlternateRowColor) > 0 ">
  241.             <xsl:if test="((position() mod 2) = 0)">
  242.                 <xsl:attribute name="bgcolor">
  243.                     <xsl:value-of select="$AlternateRowColor" disable-output-escaping = "yes" />
  244.                 </xsl:attribute>
  245.             </xsl:if>
  246.         </xsl:if>
  247.     </xsl:template>
  248.  
  249.     <!-- Displays the rows for Report Detail Table -->
  250.     <xsl:template match="Row">
  251.         <!-- Outputs a row for the table -->
  252.         <tr>
  253.             <xsl:call-template name="AlternateRowColors" />
  254.             <xsl:apply-templates select="RowHeading" />
  255.             <xsl:apply-templates select="Col" />
  256.             <xsl:apply-templates select="Subtotal" />
  257.         </tr>
  258.         <!-- Determines if a page break is needed -->
  259.         <xsl:call-template name="CheckRecordPagination">
  260.             <xsl:with-param name="Page" select="position() div $RecordsPerPage" />
  261.         </xsl:call-template>
  262.     </xsl:template>
  263.  
  264.     <!-- Determines if a page break is needed -->
  265.     <xsl:template name="CheckRecordPagination">
  266.         <xsl:param name="Page" />
  267.         <xsl:param name="tabledef">table</xsl:param>
  268.         <xsl:if test="($RecordsPerPage > 0) and (position()!=last())">
  269.             <xsl:if test="(position() mod $RecordsPerPage) = 0">
  270.                 <!-- End previous detail table -->
  271.                 <xsl:text disable-output-escaping="yes"></table></xsl:text>
  272.                 <!-- Output page break -->
  273.                 <DIV style="page-break-after:always"></DIV>
  274.                 <!-- Output a new page header -->
  275.                 <xsl:call-template name="pageheader" />
  276.                 <!-- start a new detail table -->
  277.                 <xsl:text disable-output-escaping="yes"><table width="</xsl:text>
  278.                 <xsl:value-of select="$detail-table-width" disable-output-escaping = "yes" />
  279.                 <xsl:text disable-output-escaping="yes">" border="</xsl:text>
  280.                 <xsl:choose>
  281.                     <xsl:when test="ancestor::SeapineReport/Report/BorderSize">
  282.                         <xsl:value-of select="ancestor::SeapineReport/Report/BorderSize" disable-output-escaping = "yes" />
  283.                     </xsl:when>
  284.                     <xsl:otherwise>
  285.                         <xsl:value-of select="$detail-table-bordersize" disable-output-escaping = "yes" />
  286.                     </xsl:otherwise>
  287.                 </xsl:choose>
  288.                 <xsl:text disable-output-escaping="yes">" cellpadding="</xsl:text>
  289.                 <xsl:choose>
  290.                     <xsl:when test="ancestor::SeapineReport/Report/CellPadding">
  291.                         <xsl:value-of select="ancestor::SeapineReport/Report/CellPadding" disable-output-escaping = "yes" />
  292.                     </xsl:when>
  293.                     <xsl:otherwise>
  294.                         <xsl:value-of select="$detail-table-cellpadding" disable-output-escaping = "yes" />
  295.                     </xsl:otherwise>
  296.                 </xsl:choose>
  297.                 <xsl:text disable-output-escaping="yes">" cellspacing="</xsl:text>
  298.                 <xsl:choose>
  299.                     <xsl:when test="ancestor::SeapineReport/Report/CellSpacing">
  300.                         <xsl:value-of select="ancestor::SeapineReport/Report/CellSpacing" disable-output-escaping = "yes" />
  301.                     </xsl:when>
  302.                     <xsl:otherwise>
  303.                         <xsl:value-of select="$detail-table-cellspacing" disable-output-escaping = "yes" />
  304.                     </xsl:otherwise>
  305.                 </xsl:choose>
  306.                 <xsl:if test="ancestor::SeapineReport/Report/TableBackgroundColor">
  307.                     <xsl:text disable-output-escaping="yes">" bgcolor="</xsl:text>
  308.                     <xsl:value-of select="ancestor::SeapineReport/Report/TableBackgroundColor" disable-output-escaping = "yes" />
  309.                 </xsl:if>
  310.                 <xsl:text disable-output-escaping="yes">" ></xsl:text>
  311.                 <!-- Output the table's header row on the new page-->
  312.                 <xsl:apply-templates select="ancestor::SeapineReport/Report/TableHeader" />
  313.             </xsl:if>
  314.         </xsl:if>
  315.     </xsl:template>
  316.  
  317.     <!-- Outputs the row heading for the report detail table -->
  318.     <xsl:template match="RowHeading">
  319.         <TD xsl:use-attribute-sets="report-row-heading-format">
  320.             <xsl:call-template name="OverrideCellFormat" />
  321.             <span STYLE="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily}; ">
  322.                 <xsl:if test="string-length(Label)>0">
  323.                     <xsl:value-of select="Label" disable-output-escaping = "yes" />
  324.                 </xsl:if>
  325.                 <xsl:if test="string-length(Label)=0">
  326.                       <!-- Netscape ignores backgound color if we don't do this-->
  327.                 </xsl:if>
  328.             </span>
  329.         </TD>
  330.     </xsl:template>
  331.  
  332.     <!-- Outputs the data cells for the report detail table -->
  333.     <xsl:template match="Col">
  334.         <TD xsl:use-attribute-sets="report-data-cell-format">
  335.             <xsl:call-template name="OverrideCellFormat" />
  336.             <span STYLE="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily}; ">
  337.                 <xsl:if test="string-length(Data)>0">
  338.                     <xsl:value-of select="Data" disable-output-escaping = "yes" />
  339.                 </xsl:if>
  340.                 <xsl:if test="string-length(Data)=0">
  341.                       <!-- Netscape ignores backgound color if we don't do this-->
  342.                 </xsl:if>
  343.             </span>
  344.         </TD>
  345.     </xsl:template>
  346.  
  347.     <!--Outputs the Subtotals cell for the report detail table -->
  348.     <xsl:template match="Subtotal">
  349.         <TD xsl:use-attribute-sets="report-subtotal-cell-format">
  350.             <xsl:call-template name="OverrideCellFormat" />
  351.             <span STYLE="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily}; ">
  352.                 <xsl:if test="string-length(Data)>0">
  353.                     <xsl:value-of select="Data" disable-output-escaping = "yes" />
  354.                 </xsl:if>
  355.                 <xsl:if test="string-length(Data)=0">
  356.                       <!-- Netscape ignores backgound color if we don't do this-->
  357.                 </xsl:if>
  358.             </span>
  359.         </TD>
  360.     </xsl:template>
  361.  
  362.     <!-- Outputs the Column Totals row for the report detail table -->
  363.     <xsl:template match="TableFooter">
  364.         <tr xsl:use-attribute-sets="report-column-total-row-format">
  365.             <xsl:call-template name="OverrideCellFormat" />
  366.             <xsl:apply-templates select="RowHeading" />
  367.             <xsl:apply-templates select="Subtotal" />
  368.         </tr>
  369.     </xsl:template>
  370.  
  371.     <!-- Overrides the format for the report detail  table from the XML data if the user overrode any of the stylesheet settings -->
  372.     <xsl:template name="OverRideDetailTableFormat">
  373.         <xsl:if test="Report/BorderSize">
  374.             <xsl:attribute name="border">
  375.                 <xsl:value-of select="Report/BorderSize" disable-output-escaping = "yes" />
  376.             </xsl:attribute>
  377.         </xsl:if>
  378.         <xsl:if test="Report/CellPadding">
  379.             <xsl:attribute name="cellpadding">
  380.                 <xsl:value-of select="Report/CellPadding" disable-output-escaping = "yes" />
  381.             </xsl:attribute>
  382.         </xsl:if>
  383.         <xsl:if test="Report/CellSpacing">
  384.             <xsl:attribute name="cellspacing">
  385.                 <xsl:value-of select="Report/CellSpacing" disable-output-escaping = "yes" />
  386.             </xsl:attribute>
  387.         </xsl:if>
  388.         <xsl:if test="Report/TableBackgroundColor">
  389.             <xsl:attribute name="bgcolor">
  390.                 <xsl:value-of select="Report/TableBackgroundColor" disable-output-escaping = "yes" />
  391.             </xsl:attribute>
  392.         </xsl:if>
  393.     </xsl:template>
  394.  
  395.     <!-- Outputs the Report Detail Table -->
  396.     <xsl:template name="createtable">
  397.         <table xsl:use-attribute-sets="report-detail-table-format">
  398.             <xsl:call-template name="OverRideDetailTableFormat" />
  399.             <xsl:call-template name="processreport" />
  400.         </table>
  401.     </xsl:template>
  402.  
  403.     <!-- Overrides the format for the report header table from the XML data if the user overrode any of the stylesheet settings -->
  404.     <xsl:template name="OverRideReportHeaderTableFormat">
  405.         <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/BorderSize">
  406.             <xsl:attribute name="border">
  407.                 <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/BorderSize" disable-output-escaping = "yes" />
  408.             </xsl:attribute>
  409.         </xsl:if>
  410.         <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/CellPadding">
  411.             <xsl:attribute name="cellpadding">
  412.                 <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/CellPadding" disable-output-escaping = "yes" />
  413.             </xsl:attribute>
  414.         </xsl:if>
  415.         <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/CellSpacing">
  416.             <xsl:attribute name="cellspacing">
  417.                 <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/CellSpacing" disable-output-escaping = "yes" />
  418.             </xsl:attribute>
  419.         </xsl:if>
  420.         <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/TableBackgroundColor">
  421.             <xsl:attribute name="bgcolor">
  422.                 <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/TableBackgroundColor" disable-output-escaping = "yes" />
  423.             </xsl:attribute>
  424.         </xsl:if>
  425.     </xsl:template>
  426.  
  427.     <!-- Outputs the Report Header -->
  428.     <xsl:template name="pageheader">
  429.         <table xsl:use-attribute-sets="report-pageheader-table-format">
  430.             <xsl:call-template name="OverRideReportHeaderTableFormat" />
  431.             <tr>
  432.                 <td xsl:use-attribute-sets="report-header-title-format" align="left">
  433.                     <xsl:for-each select="ancestor-or-self::SeapineReport/ReportHeader">
  434.                         <xsl:call-template name="OverrideCellFormat" />
  435.                     </xsl:for-each>
  436.                     <img xsl:use-attribute-sets="report-pageheader-image" />
  437.                 </td>
  438.                 <td xsl:use-attribute-sets="report-header-title-format">
  439.                     <xsl:for-each select="ancestor-or-self::SeapineReport/ReportHeader">
  440.                         <xsl:call-template name="OverrideCellFormat" />
  441.                     </xsl:for-each>
  442.                     <span STYLE="color:{ancestor-or-self::SeapineReport/ReportHeader/FontColor}; font-size:{ancestor-or-self::SeapineReport/ReportHeader/FontSize}; font-weight:{ancestor-or-self::SeapineReport/ReportHeader/FontWeight}; font-family:{ancestor-or-self::SeapineReport/ReportHeader/FontFamily};">
  443.                         <xsl:apply-templates select="ancestor-or-self::SeapineReport/Title" />
  444.                     </span>
  445.                 </td>
  446.             </tr>
  447.         </table>
  448.     </xsl:template>
  449.  
  450.     <!-- Overrides the format for the report footer  table from the XML data if the user overrode any of the stylesheet settings -->
  451.     <xsl:template name="OverRideReportFooterTableFormat">
  452.         <xsl:if test="ReportFooter/BorderSize">
  453.             <xsl:attribute name="border">
  454.                 <xsl:value-of select="ReportFooter/BorderSize" disable-output-escaping = "yes" />
  455.             </xsl:attribute>
  456.         </xsl:if>
  457.         <xsl:if test="ReportFooter/CellPadding">
  458.             <xsl:attribute name="cellpadding">
  459.                 <xsl:value-of select="ReportFooter/CellPadding" disable-output-escaping = "yes" />
  460.             </xsl:attribute>
  461.         </xsl:if>
  462.         <xsl:if test="ReportFooter/CellSpacing">
  463.             <xsl:attribute name="cellspacing">
  464.                 <xsl:value-of select="ReportFooter/CellSpacing" disable-output-escaping = "yes" />
  465.             </xsl:attribute>
  466.         </xsl:if>
  467.         <xsl:if test="ReportFooter/TableBackgroundColor">
  468.             <xsl:attribute name="bgcolor">
  469.                 <xsl:value-of select="ReportFooter/TableBackgroundColor" disable-output-escaping = "yes" />
  470.             </xsl:attribute>
  471.         </xsl:if>
  472.     </xsl:template>
  473.  
  474.     <!-- processes the page footer -->
  475.     <xsl:template name="pagefooter">
  476.         <table xsl:use-attribute-sets="report-pagefooter-table-format">
  477.             <xsl:call-template name="OverRideReportFooterTableFormat" />
  478.             <tr><td xsl:use-attribute-sets="report-pagefooter-cell-format" />  </tr>
  479.             <tr>
  480.                 <td xsl:use-attribute-sets="report-pagefooter-cell-format">
  481.                     <xsl:for-each select="ReportFooter">
  482.                         <xsl:call-template name="OverrideCellFormat" />
  483.                     </xsl:for-each>
  484.                     <span style="color:{ReportFooter/FontColor}; font-size:{ReportFooter/FontSize}; font-weight:{ReportFooter/FontWeight}; font-family:{ReportFooter/FontFamily} ">                             
  485.                         <!-- place desired footer data here -->
  486.                     </span>
  487.                 </td>
  488.             </tr>
  489.         </table>
  490.     </xsl:template>
  491.  
  492.     <!-- processes the report contents -->
  493.     <xsl:template name="processreport">
  494.         <xsl:if test="position()=1">
  495.             <xsl:text disable-output-escaping="yes"><tbody></xsl:text>
  496.         </xsl:if>
  497.         <xsl:for-each select="Report">
  498.             <xsl:apply-templates select="TableHeader" />
  499.         </xsl:for-each>
  500.         <xsl:for-each select="Report">
  501.             <xsl:for-each select="DataRows">
  502.                 <xsl:apply-templates select="Row" />
  503.             </xsl:for-each>
  504.         </xsl:for-each>
  505.         <xsl:for-each select="Report">
  506.             <xsl:apply-templates select="TableFooter" />
  507.         </xsl:for-each>
  508.         <xsl:if test="position()=last()">
  509.             <xsl:text disable-output-escaping="yes"></tbody></xsl:text>
  510.         </xsl:if>
  511.     </xsl:template>
  512.  
  513.     <!-- Creates the html for a single chart image tag-->
  514.     <xsl:template name="createchartimgtag">
  515.         <xsl:param name="filenamestr" />
  516.         <xsl:param name="imageno" />
  517.         <xsl:param name="legendstr" />
  518.         <xsl:if test="string-length($filenamestr) > 0">
  519.             <!-- get the imagename from the string up to the semicolon or end of string -->
  520.             <xsl:variable name="imagename" select="substring-before($filenamestr, ';')" />
  521.             <xsl:variable name="chartlegend" select="substring-before($legendstr, ';')" />
  522.             <!-- output the html -->
  523.             <td align="center" valign="top">
  524.                 <img>
  525.                     <xsl:attribute name="src">
  526.                         <xsl:if test="contains($filenamestr,';') = false">
  527.                             <xsl:value-of select="$filenamestr" disable-output-escaping = "yes" />
  528.                         </xsl:if>
  529.                         <xsl:value-of select="$imagename" disable-output-escaping = "yes" />
  530.                     </xsl:attribute>
  531.                 </img>
  532.             </td>
  533.             <!-- Determine if we need to build a legend for this chart -->
  534.             <xsl:if test="string-length($legendstr) > 0">
  535.                 <td>
  536.                     <table border="2" cellpadding="1" cellspacing="2" bgcolor="white" width="100%">
  537.                         <xsl:call-template name="createlegendtag">
  538.                             <xsl:with-param name="legendstr" select="$chartlegend" />
  539.                         </xsl:call-template>
  540.                     </table>
  541.                 </td>
  542.             </xsl:if>
  543.             <!-- check if we need to move to a new line -->
  544.             <xsl:if test="$imageno mod $MaxChartsPerLine = 0">
  545.                 <xsl:text disable-output-escaping="yes"></tr><tr></xsl:text>
  546.             </xsl:if>
  547.             <!-- look for the next occurance of image name in string -->
  548.             <xsl:call-template name="createchartimgtag">
  549.                 <xsl:with-param name="filenamestr" select="substring-after($filenamestr, ';')" />
  550.                 <xsl:with-param name="imageno" select="$imageno+1" />
  551.                 <xsl:with-param name="legendstr" select="substring-after($legendstr, ';')" />
  552.             </xsl:call-template>
  553.         </xsl:if>
  554.     </xsl:template>
  555.  
  556.     <!-- create the html for a single legend tag-->
  557.     <xsl:template name="createlegendtag">
  558.         <xsl:param name="legendstr" />
  559.         <xsl:if test="string-length($legendstr) > 0">
  560.             <!-- get the imagename from the string up to the semicolon or end of string -->
  561.             <xsl:variable name="pair" select="substring-before($legendstr, '|')" />
  562.             <xsl:variable name="labelstr" select="substring-before($pair, ':')" />
  563.             <xsl:variable name="colorstr" select="substring-after($pair, ':')" />
  564.             <!-- output the html -->
  565.             <tr>
  566.                 <td align="center" style="font-size:smaller" valign="top">
  567.                     <xsl:value-of select="$labelstr" disable-output-escaping = "yes" />
  568.                 </td>
  569.                 <td width="40px">
  570.                     <xsl:attribute name="bgColor">
  571.                         <xsl:value-of select="$colorstr" disable-output-escaping = "yes" />
  572.                     </xsl:attribute>
  573.                 </td>
  574.             </tr>
  575.             <!-- look for the next occurance of image name in string -->
  576.             <xsl:call-template name="createlegendtag">
  577.                 <xsl:with-param name="legendstr" select="substring-after($legendstr, '|')" />
  578.             </xsl:call-template>
  579.         </xsl:if>
  580.     </xsl:template>
  581.  
  582.     <!-- Parses out the names of the chart graphic files from the ChartFileNames variable create the image tags-->
  583.     <xsl:template name="createcharts">
  584.         <xsl:if test="string-length($ChartFileNames) > 0">
  585.             <table border="0" cellpadding="0" cellspacing="0" bgcolor="white">
  586.                 <tr>
  587.                     <th height="20"></th>
  588.                 </tr>
  589.                 <tr>
  590.                     <xsl:call-template name="createchartimgtag">
  591.                         <xsl:with-param name="filenamestr" select="$ChartFileNames" />
  592.                         <xsl:with-param name="imageno" select="1" />
  593.                         <xsl:with-param name="legendstr" select="$Legend" />
  594.                     </xsl:call-template>
  595.                 </tr>
  596.             </table>
  597.         </xsl:if>
  598.     </xsl:template>
  599.  
  600.     <!-- SeapineReport XML Parsing -->
  601.     <xsl:template match="/">
  602.         <html>
  603.             <head>
  604.                 <xsl:call-template name="DefineStyles" />
  605.             </head>
  606.             <body>
  607.                 <xsl:for-each select="SeapineReport">
  608.                     <xsl:call-template name="pageheader" />
  609.                     <xsl:call-template name="createtable" />
  610.                     <xsl:call-template name="createcharts" />
  611.                     <xsl:call-template name="pagefooter" />
  612.                 </xsl:for-each>
  613.             </body>
  614.         </html>
  615.     </xsl:template>
  616. </xsl:stylesheet>
  617.